define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var OG;
    (function (OG) {
        /**坐标类 */
        class Positon {
            constructor(x = 0, y = 0) {
                this.x = 0;
                this.y = 0;
                this.x = x;
                this.y = y;
            }
        }
        OG.Positon = Positon;
        /**尺寸类 */
        class Size {
            constructor(width = 0, height = 0) {
                this.width = 0;
                this.height = 0;
                this.width = width;
                this.height = height;
            }
        }
        OG.Size = Size;
        /**画笔类*/
        class PaintBrush {
            /**绑定绘制上下文context */
            constructor(context) {
                /**设置或返回用于填充绘画的颜色、渐变或模式 */
                this.fillStyle = "";
                /**设置或返回用于笔触的颜色、渐变或模式*/
                this.strokeStyle = "";
                /**设置或返回用于阴影的颜色*/
                this.shadowColor = "";
                /**设置或返回用于阴影的模糊级别*/
                this.shadowBlur = 0;
                /**设置或返回阴影距形状的水平距离*/
                this.shadowOffsetX = 0;
                /**设置或返回阴影距形状的垂直距离*/
                this.shadowOffsetY = 0;
                /**设置或返回线条的结束端点样式*/
                this.lineCap = "butt";
                /**设置或返回两条线相交时，所创建的拐角类型 */
                this.lineJoin = "miter";
                /**设置或返回当前的线条宽度*/
                this.lineWidth = 1;
                /**设置或返回最大斜接长度*/
                this.miterLimit = 10;
                this.ctx = null;
                this.ctx = context;
            }
            /**更新画笔 */
            UpdateBrush() {
                if (this.ctx != null) {
                    this.ctx.fillStyle = this.fillStyle;
                    this.ctx.strokeStyle = this.strokeStyle;
                    this.ctx.shadowColor = this.shadowColor;
                    this.ctx.shadowBlur = this.shadowBlur;
                    this.ctx.shadowOffsetX = this.shadowOffsetX;
                    this.ctx.shadowOffsetY = this.shadowOffsetY;
                    this.ctx.lineCap = this.lineCap;
                    this.ctx.lineJoin = this.lineJoin;
                    this.ctx.lineWidth = this.lineWidth;
                    this.ctx.miterLimit = this.miterLimit;
                    return this.ctx;
                }
                return null;
            }
        }
        OG.PaintBrush = PaintBrush;
    })(OG = exports.OG || (exports.OG = {}));
});
